SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.[DnnProduct_CDS_PackagedAssetsList]
	@DistributorID varchar(50),
	@Identifier varchar(50),
	@SKU nvarchar(50)
AS
BEGIN
	SELECT
		[ID],
		TemplateID,
		ResourceID,
		DistributorID,
		Identifier,
		Active,
		Title,
		Format,
		Creator,
		Publisher,
		Link,
		LinkType,
		DRMType,
		PackageStatus,
		Packaged,
		MaxDownloads,
		FileSize,
		ModificationDate,
		Notes,
		SKU,
		ListPrice
	FROM [DnnProduct_CDS_Assets]
	WHERE DistributorID = @DistributorID AND (Identifier = @Identifier OR SKU = @SKU) AND PackageStatus <> 0 AND Active = 1
END
GO
